<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <!-- 引入 layui.css -->

    <link th:href="@{/css/layui.css}" rel="stylesheet"/>
    <!-- 引入 layui.js -->
    <!--    <script src="layui.js"/>-->
    <script th:src="@{/layui.js}"></script>


</head>
<body>


</body>





<script>
    layui.use('table', function(){
        var table = layui.table;





        table.render({
            elem: '#test'
            ,url:'/demo01/bookList'
            ,cellMinWidth: 80
            ,method:'post'

            ,cols:
                [
                    [
                {field:'id', width:80, title: 'ID', sort: true}
                ,{field:'name', width:80, title: '书本名称'}
                ,{field:'auth', width:80, title: '书本作者', sort: true}


                ,{field:'auth', width:80, title: '操作', sort: true}



            ]
                ]

        });
    });
</script>


</html>